function clearSession() {
    const cookies = document.cookie
        .split(";")
        .map((cookie) => cookie.split("=")[0]);
    cookies.forEach((key) => {
        document.cookie = `${key}=;expires=${new Date(0).toUTCString()};path=/;domain=58v5.cn;Secure`;
    });
    sessionStorage.clear();
    localStorage.clear();
}
export function handleSSO(SSOtype) {
    const hostStr = window.location.host.includes("58v5.cn")
        ? "passport-cloud.58v5.cn"
        : "passport.58corp.com";
    clearSession();
    return `https://${hostStr}/${SSOtype}?service=${encodeURIComponent(window.location.origin)}`;
}
export function errorMsgTips(msg) {
    console.error(msg);
}
